package com.asiainfo.springcloud.manager;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import zipkin.server.EnableZipkinServer;

//TODO: spring-boot-admin接收client的信息
@Configuration
@EnableAutoConfiguration
@EnableDiscoveryClient
@RestController
@EnableZipkinServer
public class ScZipKinServer {
    private static final Logger logger = LoggerFactory.getLogger(ScZipKinServer.class);

    @RequestMapping("/test")
    public String home() {
        logger.info("Hello World,here is  a sc-demo");
        logger.trace("trace 成功了");
        logger.debug("debug 成功了");
        logger.info("info 成功了");
        logger.warn("warn 成功了");
        logger.error("error 成功了");
        return "Hello World,here is  a sc-demo";
    }
    public static void main(String[] args) {
        SpringApplication.run(ScZipKinServer.class, args);

    }
}


